\(\int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx\) [194]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 30 \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {\csc ^2(c+d x) (a+a \sin (c+d x))^2}{2 a d} \]

[Out]

-1/2*csc(d*x+c)^2*(a+a*sin(d*x+c))^2/a/d

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2912, 12, 37} \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {\csc ^2(c+d x) (a \sin (c+d x)+a)^2}{2 a d} \]

[In]

Int[Cot[c + d*x]*Csc[c + d*x]^2*(a + a*Sin[c + d*x]),x]

[Out]

-1/2*(Csc[c + d*x]^2*(a + a*Sin[c + d*x])^2)/(a*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a^3 (a+x)}{x^3} \, dx,x,a \sin (c+d x)\right )}{a d} \\ & = \frac {a^2 \text {Subst}\left (\int \frac {a+x}{x^3} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {\csc ^2(c+d x) (a+a \sin (c+d x))^2}{2 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.97 \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d} \]

[In]

Integrate[Cot[c + d*x]*Csc[c + d*x]^2*(a + a*Sin[c + d*x]),x]

[Out]

-((a*Csc[c + d*x])/d) - (a*Csc[c + d*x]^2)/(2*d)

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80

method result size
derivativedivides \(-\frac {a \left (\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{2}+\csc \left (d x +c \right )\right )}{d}\) \(24\)
default \(-\frac {a \left (\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{2}+\csc \left (d x +c \right )\right )}{d}\) \(24\)
risch \(-\frac {2 i a \left (i {\mathrm e}^{2 i \left (d x +c \right )}+{\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}\) \(54\)
parallelrisch \(-\frac {a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )+4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\) \(55\)
norman \(\frac {-\frac {a}{8 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}-\frac {a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\) \(101\)

[In]

int(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d*a*(1/2*csc(d*x+c)^2+csc(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.97 \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {2 \, a \sin \left (d x + c\right ) + a}{2 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(2*a*sin(d*x + c) + a)/(d*cos(d*x + c)^2 - d)

Sympy [F]

\[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \cos {\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \cos {\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx\right ) \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)**3*(a+a*sin(d*x+c)),x)

[Out]

a*(Integral(cos(c + d*x)*csc(c + d*x)**3, x) + Integral(sin(c + d*x)*cos(c + d*x)*csc(c + d*x)**3, x))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {2 \, a \sin \left (d x + c\right ) + a}{2 \, d \sin \left (d x + c\right )^{2}} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*(2*a*sin(d*x + c) + a)/(d*sin(d*x + c)^2)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.80 \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {2 \, a \sin \left (d x + c\right ) + a}{2 \, d \sin \left (d x + c\right )^{2}} \]

[In]

integrate(cos(d*x+c)*csc(d*x+c)^3*(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(2*a*sin(d*x + c) + a)/(d*sin(d*x + c)^2)

Mupad [B] (verification not implemented)

Time = 9.15 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.83 \[ \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {\frac {a}{2}+a\,\sin \left (c+d\,x\right )}{d\,{\sin \left (c+d\,x\right )}^2} \]

[In]

int((cos(c + d*x)*(a + a*sin(c + d*x)))/sin(c + d*x)^3,x)

[Out]

-(a/2 + a*sin(c + d*x))/(d*sin(c + d*x)^2)